/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package muestraTecnologica;

import java.util.Timer;
import java.util.TimerTask;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
 *
 * @author David Cuellar
 */
public class GraciasFrame extends Frames{
    
    private Timer time;
    private JLabel gracias;
    
    public GraciasFrame(){
       
       setTitle("Gracias por su Voto");
        
       gracias = new JLabel(new ImageIcon("imagenes/gracias.jpg"));
       gracias.setBounds(50, 0, 500, 300);
       
       time = new Timer("ChangeFrame");
       
       time.schedule(new TimerTask() {

            @Override
            public void run() {
                changeFrame();
            }
        }, 3000);
       
       pnlCenter.add(gracias);
       
    }
    
    
    public void changeFrame(){
        
        new LoginFrame().setVisible(true);
        dispose();
        
    }

}
